package week01;

public class TicketMaker {
    //创建TicketMaker的一个对象
    private static TicketMaker getInstance = new TicketMaker();
    //让构造函数为private,这样该类就不会被实例化
    private TicketMaker(){};
    //获取唯一可用的对象
    public static TicketMaker getNextTicketNumber(){
        return getInstance;
    }
    public void showMessage(){
        for (int i=1000;i<1005;i++){
            System.out.println(i);
        }
    }


}
